Skip to content

Conversation

@Jaehui-Lee
Copy link
Contributor

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache9
Copy link
Contributor

Apache9 commented Dec 4, 2025

This problem only affects branch-2.x?

@Jaehui-Lee
Copy link
Contributor Author

@Apache9

This issue also affects the master branch. I've opened a new PR. #7514
Thanks.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes HBASE-29526, addressing an issue where dynamic configuration changes for coprocessors were not being detected properly. The root cause was that the previous implementation compared old and new configuration objects, which failed when the configuration object was mutated in place (as happens during runtime configuration reloads).

Key changes:

  • Replaced configuration object comparison with a comparison of currently loaded coprocessors versus newly configured coprocessors
  • Added getCoprocessorClassNames() method to CoprocessorHost to retrieve fully-qualified class names of loaded coprocessors
  • Updated tests to use the server's own configuration object, properly simulating dynamic configuration reload behavior

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
hbase-server/src/main/java/org/apache/hadoop/hbase/util/CoprocessorConfigurationUtil.java Refactored checkConfigurationChange to compare loaded coprocessors against configuration values instead of comparing two configuration objects; added helper method to check if coprocessors are configured
hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java Added getCoprocessorClassNames() method to retrieve fully-qualified class names of all loaded coprocessors for comparison
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java Updated to pass coprocessor host instead of old configuration to checkConfigurationChange
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java Updated to pass coprocessor host instead of old configuration to checkConfigurationChange
hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java Updated to pass coprocessor host instead of old configuration; removed initializeCoprocessorHost helper method in favor of direct instantiation
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerOnlineConfigChange.java Updated tests to use the server's own configuration object (via getConfiguration()) instead of the test utility's configuration, correctly simulating dynamic configuration reload

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +93 to +94
if (coprocessors != null && coprocessors.length > 0) {
return true;
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hasCoprocessorsConfigured method should parse the className|priority|path format and check for empty class names, similar to how the main checkConfigurationChange method does at lines 65-72. Currently, this method returns true if the array length is greater than 0, even if all entries are empty or whitespace-only strings. This inconsistency could lead to incorrect detection of configuration changes when coprocessorHost is null.

The method should iterate through the coprocessor strings, parse each one using split("\\|"), extract the actual class name from token[0], trim it, and check if it's not null or empty before returning true.

Suggested change
if (coprocessors != null && coprocessors.length > 0) {
return true;
if (coprocessors != null) {
for (String coprocessor : coprocessors) {
// Handle the className|priority|path format
String[] tokens = coprocessor.split("\\|");
String actualClassName = tokens[0].trim();
if (!Strings.isNullOrEmpty(actualClassName)) {
return true;
}
}

Copilot uses AI. Check for mistakes.
@taklwu
Copy link
Contributor

taklwu commented Dec 11, 2025

@Jaehui-Lee is right, it's not working for existing regions, let's have the review against master branch #7514 and then we can come back on here.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

Copy link
Contributor

@taklwu taklwu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those failures should be unrelated

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 1m 12s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
_ branch-2 Compile Tests _
+1 💚 mvninstall 4m 45s branch-2 passed
+1 💚 compile 3m 41s branch-2 passed
+1 💚 checkstyle 0m 46s branch-2 passed
+1 💚 spotbugs 1m 49s branch-2 passed
+1 💚 spotless 0m 55s branch has no errors when running spotless:check.
_ Patch Compile Tests _
+1 💚 mvninstall 3m 46s the patch passed
+1 💚 compile 3m 30s the patch passed
+1 💚 javac 3m 30s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 48s the patch passed
+1 💚 spotbugs 1m 56s the patch passed
+1 💚 hadoopcheck 23m 6s Patch does not cause any errors with Hadoop 2.10.2 or 3.3.6 3.4.1.
+1 💚 spotless 0m 57s patch has no errors when running spotless:check.
_ Other Tests _
+1 💚 asflicense 0m 14s The patch does not generate ASF License warnings.
49m 25s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7506/3/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #7506
Optional Tests dupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless
uname Linux 14b951bbe599 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2 / 6ac2f7d
Default Java Eclipse Adoptium-11.0.23+9
Max. process+thread count 79 (vs. ulimit of 30000)
modules C: hbase-server U: hbase-server
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7506/3/console
versions git=2.34.1 maven=3.9.8 spotbugs=4.7.3
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 48s Docker mode activated.
-0 ⚠️ yetus 0m 6s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ branch-2 Compile Tests _
+1 💚 mvninstall 3m 36s branch-2 passed
+1 💚 compile 0m 58s branch-2 passed
+1 💚 javadoc 0m 29s branch-2 passed
+1 💚 shadedjars 6m 27s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 3m 4s the patch passed
+1 💚 compile 0m 59s the patch passed
+1 💚 javac 0m 59s the patch passed
+1 💚 javadoc 0m 27s the patch passed
+1 💚 shadedjars 6m 22s patch has no errors when building our shaded downstream artifacts.
_ Other Tests _
-1 ❌ unit 209m 19s /patch-unit-hbase-server.txt hbase-server in the patch failed.
237m 6s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7506/3/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR #7506
Optional Tests javac javadoc unit compile shadedjars
uname Linux 147cf55ea54e 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2 / 6ac2f7d
Default Java Eclipse Adoptium-17.0.11+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7506/3/testReport/
Max. process+thread count 3359 (vs. ulimit of 30000)
modules C: hbase-server U: hbase-server
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7506/3/console
versions git=2.34.1 maven=3.9.8
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 1m 14s Docker mode activated.
-0 ⚠️ yetus 0m 5s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ branch-2 Compile Tests _
+1 💚 mvninstall 4m 7s branch-2 passed
+1 💚 compile 0m 51s branch-2 passed
+1 💚 javadoc 0m 38s branch-2 passed
+1 💚 shadedjars 6m 21s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 2m 56s the patch passed
+1 💚 compile 1m 11s the patch passed
+1 💚 javac 1m 11s the patch passed
+1 💚 javadoc 0m 34s the patch passed
+1 💚 shadedjars 6m 39s patch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚 unit 305m 55s hbase-server in the patch passed.
336m 20s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7506/3/artifact/yetus-jdk8-hadoop2-check/output/Dockerfile
GITHUB PR #7506
Optional Tests javac javadoc unit compile shadedjars
uname Linux 9b98fc9e211a 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2 / 6ac2f7d
Default Java Temurin-1.8.0_412-b08
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7506/3/testReport/
Max. process+thread count 3235 (vs. ulimit of 30000)
modules C: hbase-server U: hbase-server
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7506/3/console
versions git=2.34.1 maven=3.9.8
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 1m 9s Docker mode activated.
-0 ⚠️ yetus 0m 6s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ branch-2 Compile Tests _
+1 💚 mvninstall 4m 50s branch-2 passed
+1 💚 compile 1m 11s branch-2 passed
+1 💚 javadoc 0m 38s branch-2 passed
+1 💚 shadedjars 7m 49s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 4m 5s the patch passed
+1 💚 compile 1m 3s the patch passed
+1 💚 javac 1m 3s the patch passed
+1 💚 javadoc 0m 30s the patch passed
+1 💚 shadedjars 8m 57s patch has no errors when building our shaded downstream artifacts.
_ Other Tests _
-1 ❌ unit 306m 18s /patch-unit-hbase-server.txt hbase-server in the patch failed.
341m 55s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7506/3/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #7506
Optional Tests javac javadoc unit compile shadedjars
uname Linux a10c55519f87 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2 / 6ac2f7d
Default Java Eclipse Adoptium-11.0.23+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7506/3/testReport/
Max. process+thread count 3275 (vs. ulimit of 30000)
modules C: hbase-server U: hbase-server
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7506/3/console
versions git=2.34.1 maven=3.9.8
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants